<?php
/**
 * 课程模型
 */
namespace Custom\Model;
use Think\Model;

class CurrModel extends Model{

    function get_teacher($where = '1=1',$order,$page_f,$page_l){
        $list = M('Curr')->where($where)
                         ->join('as c left join wf_teacher as t ON c.teacher_id = t.teacher_id left join wf_cate ON c.cate_id = wf_cate.cate_id')
                         ->field('c.curr_name,teacher_name,curr_img,c.add_time,c.is_show,c.curr_id,c.sort,head_img,wf_cate.cate_name,is_hot,is_recommend')
                         ->order($order)
                         ->limit($page_f.','.$page_l)
                         ->select();
        return $list;
    }

}